package com.share.constant;


import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

@Getter
@Setter
public class LogInfo {
    private String userId;
    private LocalDateTime requestTime;
    private String requestUrl;
    private String requestIp;
    private int responseStatusCode;
    private long responseTime;


    // toString 方法用于格式化输出日志
    @Override
    public String toString() {
        return String.format("User ID: %s, Request Time: %s, Request URL: %s, Request IP: %s, Response Status Code: %d, Response Time: %dms",
                userId, requestTime, requestUrl, requestIp, responseStatusCode, responseTime);
    }
}
